/*
 *  Copyright 2022 Collate.
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *  http://www.apache.org/licenses/LICENSE-2.0
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

/* eslint-disable max-len */
import { OperationPermission } from '../context/PermissionProvider/PermissionProvider.interface';
import {
  EntityStatus,
  ProviderType,
} from '../generated/entity/data/glossaryTerm';

export const mockedGlossaryTerms = [
  {
    id: 'a5a97523-2229-41e5-abbe-65f61a534c34',
    name: 'Clothing',
    displayName: 'Clothing',
    description: 'description of Business Glossary.Clothing',
    fullyQualifiedName: 'Business Glossary.Clothing',
    synonyms: [],
    glossary: {
      id: 'mocked-glossary-id',
      type: 'glossary',
      name: 'Mock Glossary',
      description: '',
      displayName: 'Mock Glossary',
      deleted: false,
    },
    childrenCount: 2,
    children: [
      {
        id: 'child-1-clothing',
        name: 'Shirts',
        displayName: 'Shirts',
        description: 'All types of shirts',
        fullyQualifiedName: 'Business Glossary.Clothing.Shirts',
        synonyms: ['Top', 'Blouse'],
        childrenCount: 2,
        children: [
          {
            id: 'child-1-1-clothing',
            name: 'T-Shirts',
            displayName: 'T-Shirts',
            description: 'Casual T-Shirts',
            fullyQualifiedName: 'Business Glossary.Clothing.Shirts.T-Shirts',
            synonyms: ['Tee'],
            childrenCount: 0,
            children: [],
            entityStatus: EntityStatus.Approved,
          },
          {
            id: 'child-1-2-clothing',
            name: 'Formal Shirts',
            displayName: 'Formal Shirts',
            description: 'Business formal shirts',
            fullyQualifiedName:
              'Business Glossary.Clothing.Shirts.Formal Shirts',
            synonyms: ['Dress Shirts'],
            childrenCount: 0,
            children: [],
            entityStatus: EntityStatus.Draft,
          },
        ],
        entityStatus: EntityStatus.Approved,
      },
      {
        id: 'child-2-clothing',
        name: 'Pants',
        displayName: 'Pants',
        description: 'All types of pants',
        fullyQualifiedName: 'Business Glossary.Clothing.Pants',
        synonyms: ['Trousers'],
        childrenCount: 1,
        children: [
          {
            id: 'child-2-1-clothing',
            name: 'Jeans',
            displayName: 'Jeans',
            description: 'Denim pants',
            fullyQualifiedName: 'Business Glossary.Clothing.Pants.Jeans',
            synonyms: ['Denims'],
            childrenCount: 0,
            children: [],
            entityStatus: EntityStatus.InReview,
          },
        ],
        entityStatus: EntityStatus.Approved,
      },
    ],
    relatedTerms: [],
    references: [],
    version: 1.3,
    updatedAt: 1647931273177,
    updatedBy: 'anonymous',
    reviewers: [],
    tags: [],
    entityStatus: EntityStatus.Draft,
    deleted: false,
  },
  {
    id: '937b87df-0b20-4464-bb12-8a2a268d1f1d',
    name: 'Sales',
    displayName: 'Sales',
    description: 'description of Business Glossary.Sales',
    fullyQualifiedName: 'Business Glossary.Sales',
    synonyms: [],
    glossary: {
      id: 'mocked-glossary-id',
      type: 'glossary',
      name: 'Mock Glossary',
      description: '',
      displayName: 'Mock Glossary',
      deleted: false,
    },
    childrenCount: 1,
    children: [
      {
        id: 'child-1-sales',
        name: 'Revenue',
        displayName: 'Revenue',
        description: 'Income generated from sales',
        fullyQualifiedName: 'Business Glossary.Sales.Revenue',
        synonyms: ['Income', 'Earnings'],
        childrenCount: 2,
        children: [
          {
            id: 'child-1-1-sales',
            name: 'Gross Revenue',
            displayName: 'Gross Revenue',
            description: 'Total revenue before deductions',
            fullyQualifiedName: 'Business Glossary.Sales.Revenue.Gross Revenue',
            synonyms: [],
            childrenCount: 0,
            children: [],
            entityStatus: EntityStatus.Approved,
          },
          {
            id: 'child-1-2-sales',
            name: 'Net Revenue',
            displayName: 'Net Revenue',
            description: 'Revenue after deductions',
            fullyQualifiedName: 'Business Glossary.Sales.Revenue.Net Revenue',
            synonyms: [],
            childrenCount: 0,
            children: [],
            entityStatus: EntityStatus.Approved,
          },
        ],
        entityStatus: EntityStatus.Approved,
      },
    ],
    relatedTerms: [],
    references: [],
    version: 1.3,
    updatedAt: 1647931273177,
    updatedBy: 'anonymous',
    reviewers: [],
    tags: [],
    entityStatus: EntityStatus.Approved,
    deleted: false,
  },
];

export const mockedGlossaries = [
  {
    deleted: false,
    displayName: 'Mocked Glossary',
    description: '',
    id: 'mocked-glossary-id',
    name: 'Mock Glossary',
    owner: {
      deleted: false,
      displayName: 'Mocked User',
      id: 'mocked-user-id',
      name: 'mocked_user',
      type: 'user',
    },
    reviewers: [],
    tags: [],
    updatedAt: 1234567890,
    updatedBy: 'mocked_user',
    version: 0.1,
  },
];

export const mockGlossaryList = [
  {
    name: 'Tag1',
    displayName: 'Tag1',
    fullyQualifiedName: 'Glossary.Tag1',
    type: 'glossaryTerm',
    id: 'glossaryTagId1',
  },
  {
    name: 'Tag2',
    displayName: 'Tag2',
    fullyQualifiedName: 'Glossary.Tag2',
    type: 'glossaryTerm',
    id: 'glossaryTagId2',
  },
];

export const MOCK_GLOSSARY = {
  id: '35f8ca1c-65a7-403f-af1f-d86683f5e16d',
  name: 'Business glossary',
  fullyQualifiedName: 'Business glossary',
  displayName: 'Business glossary',
  description: 'Lorem Ipsum is simply ',
  version: 1.7,
  updatedAt: 1654247462471,
  updatedBy: 'anonymous',
  href: 'http://localhost:8585/api/v1/glossaries/35f8ca1c-65a7-403f-af1f-d86683f5e16d',
  reviewers: [
    {
      id: '790d6873-dbe1-4297-8e0a-59d4f88eaf9d',
      type: 'user',
      name: 'aaron_singh2',
      fullyQualifiedName: 'aaron_singh2',
      displayName: 'Aaron Singh',
      deleted: false,
      href: 'http://localhost:8585/api/v1/users/790d6873-dbe1-4297-8e0a-59d4f88eaf9d',
    },
    {
      id: '6f5ffe31-437f-496f-92fe-15886fe67f43',
      type: 'user',
      name: 'aaron_warren5',
      fullyQualifiedName: 'aaron_warren5',
      displayName: 'Aaron Warren',
      deleted: false,
      href: 'http://localhost:8585/api/v1/users/6f5ffe31-437f-496f-92fe-15886fe67f43',
    },
    {
      id: '7abd5d27-b8cf-4dc7-a98b-faa91e4d1ceb',
      type: 'user',
      name: 'adam_rodriguez9',
      fullyQualifiedName: 'adam_rodriguez9',
      displayName: 'Adam Rodriguez',
      deleted: false,
      href: 'http://localhost:8585/api/v1/users/7abd5d27-b8cf-4dc7-a98b-faa91e4d1ceb',
    },
  ],
  owner: {
    id: 'cffe41bc-2306-4fff-8b92-9ecf3e414127',
    type: 'user',
    name: 'aaron_johnson0',
    fullyQualifiedName: 'aaron_johnson0',
    displayName: 'Aaron Johnson',
    deleted: false,
    href: 'http://localhost:8585/api/v1/users/cffe41bc-2306-4fff-8b92-9ecf3e414127',
  },
  tags: [
    {
      tagFQN: 'PersonalData.SpecialCategory',
      description: 'GDPR special category ',
      source: 'Classification',
      labelType: 'Manual',
      state: 'Confirmed',
    },
    {
      tagFQN: 'PII.Sensitive',
      description:
        'PII which if lost, compromised, or disclosed without authorization, could result in substantial harm, embarrassment, inconvenience, or unfairness to an individual.',
      source: 'Classification',
      labelType: 'Manual',
      state: 'Confirmed',
    },
  ],
  changeDescription: {
    fieldsAdded: [],
    fieldsUpdated: [],
    fieldsDeleted: [],
    previousVersion: 1.6,
  },
  deleted: false,
};

export const MOCK_ASSETS_DATA = {
  data: {
    took: 28,
    timed_out: false,
    _shards: { total: 5, successful: 5, skipped: 0, failed: 0 },
    hits: {
      total: { value: 1, relation: 'eq' },
      max_score: 2.1288848,
      hits: [
        {
          _index: 'table_search_index',
          _type: '_doc',
          _id: 'c514ca18-2ea4-44b1-aa06-0c66bc0cd355',
          _score: 2.1288848,
          _source: {
            id: 'c514ca18-2ea4-44b1-aa06-0c66bc0cd355',
            name: 'raw_order',
            fullyQualifiedName: 'sample_data.ecommerce_db.shopify.raw_order',
            description:
              'This is a raw orders table as represented in our online DB.',
            version: 0.8,
            updatedAt: 1664445302349,
            updatedBy: 'bharatdussa',
            href: 'http://localhost:8585/api/v1/tables/c514ca18-2ea4-44b1-aa06-0c66bc0cd355',
            tableType: 'Regular',
            columns: [
              {
                dataLength: 1,
                dataType: 'STRING',
                name: 'comments',
                constraint: 'NULL',
                fullyQualifiedName:
                  'sample_data.ecommerce_db.shopify.raw_order.comments',
                ordinalPosition: 1,
                dataTypeDisplay: 'string',
                tags: [
                  {
                    tagFQN: 'PersonalData.Personal',
                    labelType: 'Manual',
                    description:
                      'Data that can be used to directly or indirectly identify a person.',
                    source: 'Classification',
                    state: 'Confirmed',
                  },
                  {
                    tagFQN: 'PersonalData.SpecialCategory',
                    labelType: 'Manual',
                    description:
                      'GDPR special category data is personal information of data subjects that is especially sensitive.',
                    source: 'Classification',
                    state: 'Confirmed',
                  },
                ],
                customMetrics: [],
              },
              {
                dataLength: 1,
                dataType: 'STRING',
                name: 'creditcard',
                constraint: 'NULL',
                fullyQualifiedName:
                  'sample_data.ecommerce_db.shopify.raw_order.creditcard',
                ordinalPosition: 2,
                dataTypeDisplay: 'string',
                tags: [],
                customMetrics: [],
              },
              {
                dataLength: 1,
                dataType: 'STRING',
                name: 'membership',
                constraint: 'NULL',
                fullyQualifiedName:
                  'sample_data.ecommerce_db.shopify.raw_order.membership',
                ordinalPosition: 4,
                dataTypeDisplay: 'string',
                tags: [],
                customMetrics: [],
              },
              {
                dataLength: 1,
                dataType: 'ARRAY',
                name: 'orders',
                constraint: 'NULL',
                fullyQualifiedName:
                  'sample_data.ecommerce_db.shopify.raw_order.orders',
                ordinalPosition: 5,
                dataTypeDisplay:
                  'array<struct<product_id:character varying(24),price:int,onsale:boolean,tax:int,weight:int,others:int,vendor:character varying(64)>>',
                arrayDataType: 'STRUCT',
                tags: [],
                customMetrics: [],
              },
            ],
            databaseSchema: {
              deleted: false,
              name: 'shopify',
              description:
                'This **mock** database contains schema related to shopify sales and orders with related dimension tables.',
              id: '85217879-eff9-4990-9f76-806a563c500b',
              href: 'http://localhost:8585/api/v1/databaseSchemas/85217879-eff9-4990-9f76-806a563c500b',
              type: 'databaseSchema',
              fullyQualifiedName: 'sample_data.ecommerce_db.shopify',
            },
            database: {
              deleted: false,
              name: 'ecommerce_db',
              description:
                'This **mock** database contains schemas related to shopify sales and orders with related dimension tables.',
              id: '0b37dd2c-b235-4243-8ea8-7485f9b7c4a3',
              href: 'http://localhost:8585/api/v1/databases/0b37dd2c-b235-4243-8ea8-7485f9b7c4a3',
              type: 'database',
              fullyQualifiedName: 'sample_data.ecommerce_db',
            },
            service: {
              deleted: false,
              name: 'sample_data',
              id: '3768e7fe-ce05-480d-9021-38baf0d0f637',
              href: 'http://localhost:8585/api/v1/services/databaseServices/3768e7fe-ce05-480d-9021-38baf0d0f637',
              type: 'databaseService',
              fullyQualifiedName: 'sample_data',
            },
            serviceType: 'BigQuery',
            tags: [
              {
                tagFQN: 'PersonalData.Personal',
                labelType: 'Manual',
                description:
                  'Data that can be used to directly or indirectly identify a person.',
                source: 'Classification',
                state: 'Confirmed',
              },
            ],
            usageSummary: {
              dailyStats: { count: 0, percentileRank: 0.0 },
              weeklyStats: { count: 0, percentileRank: 0.0 },
              monthlyStats: { count: 0, percentileRank: 0.0 },
              date: '2022-09-29',
            },
            followers: [],
            tableQueries: [],
            deleted: false,
            tier: null,
            suggest: [
              {
                input: 'sample_data.ecommerce_db.shopify.raw_order',
                weight: 5,
              },
              { input: 'raw_order', weight: 10 },
            ],
            service_suggest: [{ input: 'sample_data', weight: 5 }],
            column_suggest: [
              { input: 'comments', weight: 5 },
              { input: 'creditcard', weight: 5 },
              { input: 'membership', weight: 5 },
              { input: 'orders', weight: 5 },
            ],
            schema_suggest: [{ input: 'shopify', weight: 5 }],
            database_suggest: [{ input: 'ecommerce_db', weight: 5 }],
            entityType: 'table',
            owner: {
              deleted: false,
              displayName: 'Bharat Dussa',
              name: 'bharatdussa',
              id: 'f187364d-114c-4426-b941-baf6a15f70e4',
              href: 'http://localhost:8585/api/v1/users/f187364d-114c-4426-b941-baf6a15f70e4',
              type: 'user',
              fullyQualifiedName: 'bharatdussa',
            },
          },
        },
      ],
    },
    aggregations: {
      'sterms#EntityType': {
        doc_count_error_upper_bound: 0,
        sum_other_doc_count: 0,
        buckets: [{ key: 'table', doc_count: 1 }],
      },
      'sterms#Tags': {
        doc_count_error_upper_bound: 0,
        sum_other_doc_count: 0,
        buckets: [
          { key: 'PII.NonSensitive', doc_count: 1 },
          { key: 'PII.None', doc_count: 1 },
          { key: 'PII.Sensitive', doc_count: 1 },
          { key: 'PersonalData.Personal', doc_count: 1 },
          { key: 'PersonalData.SpecialCategory', doc_count: 1 },
          { key: 'test-category.test-glossary-term-tag', doc_count: 1 },
          { key: 'test-glossary.test-glossary-term', doc_count: 1 },
        ],
      },
    },
  },
};

export const VERSION_VIEW_GLOSSARY_PERMISSION = {
  Create: false,
  Delete: false,
  EditAll: false,
  EditCustomFields: false,
  EditDataProfile: false,
  EditDescription: false,
  EditDisplayName: false,
  EditLineage: false,
  EditOwners: false,
  EditQueries: false,
  EditSampleData: false,
  EditTags: false,
  EditTests: false,
  EditTier: false,
  ViewAll: true,
  ViewDataProfile: false,
  ViewQueries: false,
  ViewSampleData: false,
  ViewTests: false,
  ViewUsage: false,
} as OperationPermission;

export const MOCK_PERMISSIONS = {
  Create: true,
  Delete: true,
  EditAll: true,
  EditCustomFields: true,
  EditDataProfile: true,
  EditDescription: true,
  EditDisplayName: true,
  EditLineage: true,
  EditOwners: true,
  EditQueries: true,
  EditSampleData: true,
  EditTags: true,
  EditTests: true,
  EditTier: true,
  ViewAll: true,
  ViewDataProfile: true,
  ViewQueries: true,
  ViewSampleData: true,
  ViewTests: true,
  ViewUsage: true,
} as OperationPermission;

export const MOCK_GLOSSARY_NO_PERMISSIONS = {
  Create: false,
  Delete: false,
  EditAll: false,
  ViewAll: true,
} as OperationPermission;

export const MOCKED_GLOSSARY_TERMS = [
  {
    id: 'a735e9c0-a98f-43aa-8c15-490a55198f3c',
    name: 'Air Conditioners',
    displayName: 'Air Conditioners',
    description: 'Air Conditioners',
    fullyQualifiedName: 'Electronics.Air Conditioners',
    synonyms: [],
    glossary: {
      id: '3aaaa48f-a153-483d-9031-12d9f2426cfb',
      type: 'glossary',
      name: 'Electronics',
      fullyQualifiedName: 'Electronics',
      description: 'Electronics description',
      displayName: 'Electronics',
      deleted: false,
    },
    children: [],
    relatedTerms: [],
    references: [],
    version: 0.1,
    type: 'glossaryTerm',
    updatedAt: 1682348752125,
    updatedBy: 'karan',
    reviewers: [],
    owner: {
      id: '93bb9db6-ead6-40d8-a32a-1c6bd6b2c143',
      type: 'user',
      name: 'karan',
      fullyQualifiedName: 'karan',
      displayName: 'Karan Hotchandani',
      deleted: false,
    },
    tags: [],
    entityStatus: EntityStatus.Draft,
    deleted: false,
    provider: ProviderType.User,
    mutuallyExclusive: false,
  },
  {
    id: '18f310c6-7f43-4b4e-9d8c-5d30ff913a3c',
    name: 'Mobiles',
    displayName: 'Mobiles',
    description: 'Mobiles description',
    fullyQualifiedName: 'Electronics.Mobiles',
    synonyms: ['accessory'],
    glossary: {
      id: '3aaaa48f-a153-483d-9031-12d9f2426cfb',
      type: 'glossary',
      name: 'Electronics',
      fullyQualifiedName: 'Electronics',
      description: 'Electronics description',
      displayName: 'Electronics',
      deleted: false,
    },
    children: [
      {
        id: 'b54bf954-a4bf-4566-9213-3130c9ec27ea',
        type: 'glossaryTerm',
        name: 'Iphones',
        fullyQualifiedName: 'Electronics.Mobiles.Iphones',
        description: 'Updated description',
        displayName: 'Iphones',
        deleted: false,
      },
    ],
    relatedTerms: [],
    references: [
      {
        name: 'google',
        endpoint: 'https://www.google.com',
      },
    ],
    version: 0.1,
    updatedAt: 1682348731309,
    updatedBy: 'karan',
    reviewers: [],
    owner: {
      id: '93bb9db6-ead6-40d8-a32a-1c6bd6b2c143',
      type: 'user',
      name: 'karan',
      fullyQualifiedName: 'karan',
      displayName: 'Karan Hotchandani',
      deleted: false,
    },
    tags: [],
    entityStatus: EntityStatus.Draft,
    deleted: false,
    provider: ProviderType.User,
    mutuallyExclusive: false,
  },
  {
    id: 'b54bf954-a4bf-4566-9213-3130c9ec27ea',
    name: 'Iphones',
    displayName: 'Iphones',
    description: 'Updated description',
    fullyQualifiedName: 'Electronics.Mobiles.Iphones',
    synonyms: ['accessory'],
    glossary: {
      id: '3aaaa48f-a153-483d-9031-12d9f2426cfb',
      type: 'glossary',
      name: 'Electronics',
      fullyQualifiedName: 'Electronics',
      description: 'Electronics description',
      displayName: 'Electronics',
      deleted: false,
    },
    parent: {
      id: '18f310c6-7f43-4b4e-9d8c-5d30ff913a3c',
      type: 'glossaryTerm',
      name: 'Mobiles',
      fullyQualifiedName: 'Electronics.Mobiles',
      description: 'Mobiles description',
      displayName: 'Mobiles',
      deleted: false,
    },
    children: [],
    relatedTerms: [
      {
        id: '2a5a09ac-1c9a-42b8-bdf2-4adb4f141f55',
        type: 'glossaryTerm',
        name: 'Business Customer',
        fullyQualifiedName: 'Customer.Business Customer',
        description: 'Business Customer',
        displayName: 'Business Customer',
        deleted: false,
      },
    ],
    references: [
      {
        name: 'google',
        endpoint: 'https://www.google.com',
      },
    ],
    version: 0.4,
    updatedAt: 1682348835466,
    updatedBy: 'karan',
    reviewers: [],
    owner: {
      id: '93bb9db6-ead6-40d8-a32a-1c6bd6b2c143',
      type: 'user',
      name: 'karan',
      fullyQualifiedName: 'karan',
      displayName: 'Karan Hotchandani',
      deleted: false,
    },
    tags: [],
    entityStatus: EntityStatus.Draft,
    deleted: false,
    provider: ProviderType.User,
    mutuallyExclusive: false,
  },
];

export const MOCKED_GLOSSARY_TERMS_TREE = [
  {
    children: undefined,
    deleted: false,
    description: 'Air Conditioners',
    displayName: 'Air Conditioners',
    fullyQualifiedName: 'Electronics.Air Conditioners',
    glossary: {
      deleted: false,
      description: 'Electronics description',
      displayName: 'Electronics',
      fullyQualifiedName: 'Electronics',
      id: '3aaaa48f-a153-483d-9031-12d9f2426cfb',
      name: 'Electronics',
      type: 'glossary',
    },
    id: 'a735e9c0-a98f-43aa-8c15-490a55198f3c',
    mutuallyExclusive: false,
    name: 'Air Conditioners',
    owner: {
      deleted: false,
      displayName: 'Karan Hotchandani',
      fullyQualifiedName: 'karan',
      id: '93bb9db6-ead6-40d8-a32a-1c6bd6b2c143',
      name: 'karan',
      type: 'user',
    },
    provider: ProviderType.User,
    references: [],
    relatedTerms: [],
    reviewers: [],
    entityStatus: 'Draft' as EntityStatus,
    synonyms: [],
    tags: [],
    type: 'glossaryTerm',
    updatedAt: 1682348752125,
    updatedBy: 'karan',
    version: 0.1,
  },
  {
    children: [
      {
        children: undefined,
        deleted: false,
        description: 'Updated description',
        displayName: 'Iphones',
        fullyQualifiedName: 'Electronics.Mobiles.Iphones',
        glossary: {
          deleted: false,
          description: 'Electronics description',
          displayName: 'Electronics',
          fullyQualifiedName: 'Electronics',
          id: '3aaaa48f-a153-483d-9031-12d9f2426cfb',
          name: 'Electronics',
          type: 'glossary',
        },
        id: 'b54bf954-a4bf-4566-9213-3130c9ec27ea',
        mutuallyExclusive: false,
        name: 'Iphones',
        owner: {
          deleted: false,
          displayName: 'Karan Hotchandani',
          fullyQualifiedName: 'karan',
          id: '93bb9db6-ead6-40d8-a32a-1c6bd6b2c143',
          name: 'karan',
          type: 'user',
        },
        parent: {
          deleted: false,
          description: 'Mobiles description',
          displayName: 'Mobiles',
          fullyQualifiedName: 'Electronics.Mobiles',
          id: '18f310c6-7f43-4b4e-9d8c-5d30ff913a3c',
          name: 'Mobiles',
          type: 'glossaryTerm',
        },
        provider: ProviderType.User,
        references: [{ endpoint: 'https://www.google.com', name: 'google' }],
        relatedTerms: [
          {
            deleted: false,
            description: 'Business Customer',
            displayName: 'Business Customer',
            fullyQualifiedName: 'Customer.Business Customer',
            id: '2a5a09ac-1c9a-42b8-bdf2-4adb4f141f55',
            name: 'Business Customer',
            type: 'glossaryTerm',
          },
        ],
        reviewers: [],
        entityStatus: 'Draft' as EntityStatus,
        synonyms: ['accessory'],
        tags: [],
        type: 'glossaryTerm',
        updatedAt: 1682348835466,
        updatedBy: 'karan',
        version: 0.4,
      },
    ],
    deleted: false,
    description: 'Mobiles description',
    displayName: 'Mobiles',
    fullyQualifiedName: 'Electronics.Mobiles',
    glossary: {
      deleted: false,
      description: 'Electronics description',
      displayName: 'Electronics',
      fullyQualifiedName: 'Electronics',
      id: '3aaaa48f-a153-483d-9031-12d9f2426cfb',
      name: 'Electronics',
      type: 'glossary',
    },
    id: '18f310c6-7f43-4b4e-9d8c-5d30ff913a3c',
    mutuallyExclusive: false,
    name: 'Mobiles',
    owner: {
      deleted: false,
      displayName: 'Karan Hotchandani',
      fullyQualifiedName: 'karan',
      id: '93bb9db6-ead6-40d8-a32a-1c6bd6b2c143',
      name: 'karan',
      type: 'user',
    },
    provider: ProviderType.User,
    references: [{ endpoint: 'https://www.google.com', name: 'google' }],
    relatedTerms: [],
    reviewers: [],
    entityStatus: 'Draft' as EntityStatus,
    synonyms: ['accessory'],
    tags: [],
    updatedAt: 1682348731309,
    updatedBy: 'karan',
    version: 0.1,
  },
];

export const MOCKED_GLOSSARY_TERMS_1 = [
  {
    id: 'e01f0674-4963-43d9-a9eb-0967c63e1385',
    name: 'A_bg1',
    displayName: '',
    description: 'fsff',
    fullyQualifiedName: 'Banking.Term1.Term2f.BG1.A_bg1',
    synonyms: [],
    glossary: {
      id: '36b9b2b0-e031-4aff-93f3-5e01996cd85e',
      type: 'glossary',
      name: 'Banking',
      fullyQualifiedName: 'Banking',
      description: 'Test',
      deleted: false,
      href: 'http://localhost:8585/api/v1/glossaries/36b9b2b0-e031-4aff-93f3-5e01996cd85e',
    },
    parent: {
      id: 'd88adce6-4cc3-4088-b436-4630c87307f0',
      type: 'glossaryTerm',
      name: 'BG1',
      fullyQualifiedName: 'Banking.Term1.Term2f.BG1',
      description: 'fsff',
      displayName: '',
      deleted: false,
      href: 'http://localhost:8585/api/v1/glossaryTerms/d88adce6-4cc3-4088-b436-4630c87307f0',
    },
    children: [],
    relatedTerms: [],
    references: [],
    version: 0.1,
    updatedAt: 1689250053292,
    updatedBy: 'admin',
    href: 'http://localhost:8585/api/v1/glossaryTerms/e01f0674-4963-43d9-a9eb-0967c63e1385',
    reviewers: [],
    owner: {
      id: '6c5e77d7-8e4f-4f0e-a746-477702901997',
      type: 'user',
      name: 'admin',
      fullyQualifiedName: 'admin',
      deleted: false,
      href: 'http://localhost:8585/api/v1/users/6c5e77d7-8e4f-4f0e-a746-477702901997',
    },
    tags: [],
    entityStatus: 'Draft' as EntityStatus,
    deleted: false,
    provider: ProviderType.User,
    mutuallyExclusive: false,
  },
  {
    id: '0471d1f3-d0c8-49b6-a7ee-6ef3a716a6a3',
    name: 'A_start',
    displayName: '',
    description: 'fsggs',
    fullyQualifiedName: 'Banking.Term1.Term2f.A_start',
    synonyms: [],
    glossary: {
      id: '36b9b2b0-e031-4aff-93f3-5e01996cd85e',
      type: 'glossary',
      name: 'Banking',
      fullyQualifiedName: 'Banking',
      description: 'Test',
      deleted: false,
      href: 'http://localhost:8585/api/v1/glossaries/36b9b2b0-e031-4aff-93f3-5e01996cd85e',
    },
    parent: {
      id: '50f1f9ab-50f2-45c5-a1b8-06aa03ece34a',
      type: 'glossaryTerm',
      name: 'Term2f',
      fullyQualifiedName: 'Banking.Term1.Term2f',
      description: 'afa',
      displayName: '',
      deleted: false,
      href: 'http://localhost:8585/api/v1/glossaryTerms/50f1f9ab-50f2-45c5-a1b8-06aa03ece34a',
    },
    children: [],
    relatedTerms: [],
    references: [],
    version: 0.1,
    updatedAt: 1689250037364,
    updatedBy: 'admin',
    href: 'http://localhost:8585/api/v1/glossaryTerms/0471d1f3-d0c8-49b6-a7ee-6ef3a716a6a3',
    reviewers: [],
    owner: {
      id: '6c5e77d7-8e4f-4f0e-a746-477702901997',
      type: 'user',
      name: 'admin',
      fullyQualifiedName: 'admin',
      deleted: false,
      href: 'http://localhost:8585/api/v1/users/6c5e77d7-8e4f-4f0e-a746-477702901997',
    },
    tags: [],
    entityStatus: 'Draft' as EntityStatus,
    deleted: false,
    provider: ProviderType.User,
    mutuallyExclusive: false,
  },
  {
    id: 'd88adce6-4cc3-4088-b436-4630c87307f0',
    name: 'BG1',
    displayName: '',
    description: 'fsff',
    fullyQualifiedName: 'Banking.Term1.Term2f.BG1',
    synonyms: [],
    glossary: {
      id: '36b9b2b0-e031-4aff-93f3-5e01996cd85e',
      type: 'glossary',
      name: 'Banking',
      fullyQualifiedName: 'Banking',
      description: 'Test',
      deleted: false,
      href: 'http://localhost:8585/api/v1/glossaries/36b9b2b0-e031-4aff-93f3-5e01996cd85e',
    },
    parent: {
      id: '50f1f9ab-50f2-45c5-a1b8-06aa03ece34a',
      type: 'glossaryTerm',
      name: 'Term2f',
      fullyQualifiedName: 'Banking.Term1.Term2f',
      description: 'afa',
      displayName: '',
      deleted: false,
      href: 'http://localhost:8585/api/v1/glossaryTerms/50f1f9ab-50f2-45c5-a1b8-06aa03ece34a',
    },
    children: [
      {
        id: 'e01f0674-4963-43d9-a9eb-0967c63e1385',
        type: 'glossaryTerm',
        name: 'A_bg1',
        fullyQualifiedName: 'Banking.Term1.Term2f.BG1.A_bg1',
        description: 'fsff',
        displayName: '',
        deleted: false,
        href: 'http://localhost:8585/api/v1/glossaryTerms/e01f0674-4963-43d9-a9eb-0967c63e1385',
      },
    ],
    relatedTerms: [],
    references: [],
    version: 0.2,
    updatedAt: 1689247414058,
    updatedBy: 'admin',
    href: 'http://localhost:8585/api/v1/glossaryTerms/d88adce6-4cc3-4088-b436-4630c87307f0',
    reviewers: [],
    owner: {
      id: '6c5e77d7-8e4f-4f0e-a746-477702901997',
      type: 'user',
      name: 'admin',
      fullyQualifiedName: 'admin',
      deleted: false,
      href: 'http://localhost:8585/api/v1/users/6c5e77d7-8e4f-4f0e-a746-477702901997',
    },
    tags: [],
    changeDescription: {
      fieldsAdded: [],
      fieldsUpdated: [
        {
          name: 'parent',
          oldValue:
            '{"id":"4242d926-8b80-4b03-9dbe-ab7138c45494","type":"glossaryTerm","name":"Term1","fullyQualifiedName":"Banking.Term1","description":"test","displayName":"","deleted":false}',
          newValue:
            '{"id":"50f1f9ab-50f2-45c5-a1b8-06aa03ece34a","type":"glossaryTerm","name":"Term2f","fullyQualifiedName":"Banking.Term1.Term2f","description":"afa","displayName":"","deleted":false}',
        },
      ],
      fieldsDeleted: [],
      previousVersion: 0.1,
    },
    entityStatus: 'Draft' as EntityStatus,
    deleted: false,
    provider: ProviderType.User,
    mutuallyExclusive: false,
  },
  {
    id: '4242d926-8b80-4b03-9dbe-ab7138c45494',
    name: 'Term1',
    displayName: '',
    description: 'test',
    fullyQualifiedName: 'Banking.Term1',
    synonyms: [],
    glossary: {
      id: '36b9b2b0-e031-4aff-93f3-5e01996cd85e',
      type: 'glossary',
      name: 'Banking',
      fullyQualifiedName: 'Banking',
      description: 'Test',
      deleted: false,
      href: 'http://localhost:8585/api/v1/glossaries/36b9b2b0-e031-4aff-93f3-5e01996cd85e',
    },
    children: [
      {
        id: '50f1f9ab-50f2-45c5-a1b8-06aa03ece34a',
        type: 'glossaryTerm',
        name: 'Term2f',
        fullyQualifiedName: 'Banking.Term1.Term2f',
        description: 'afa',
        displayName: '',
        deleted: false,
        href: 'http://localhost:8585/api/v1/glossaryTerms/50f1f9ab-50f2-45c5-a1b8-06aa03ece34a',
      },
    ],
    relatedTerms: [],
    references: [],
    version: 0.1,
    updatedAt: 1689247367690,
    updatedBy: 'admin',
    href: 'http://localhost:8585/api/v1/glossaryTerms/4242d926-8b80-4b03-9dbe-ab7138c45494',
    reviewers: [],
    owner: {
      id: '6c5e77d7-8e4f-4f0e-a746-477702901997',
      type: 'user',
      name: 'admin',
      fullyQualifiedName: 'admin',
      deleted: false,
      href: 'http://localhost:8585/api/v1/users/6c5e77d7-8e4f-4f0e-a746-477702901997',
    },
    tags: [],
    entityStatus: 'Draft' as EntityStatus,
    deleted: false,
    provider: ProviderType.User,
    mutuallyExclusive: false,
  },
  {
    id: '50f1f9ab-50f2-45c5-a1b8-06aa03ece34a',
    name: 'Term2f',
    displayName: '',
    description: 'afa',
    fullyQualifiedName: 'Banking.Term1.Term2f',
    synonyms: [],
    glossary: {
      id: '36b9b2b0-e031-4aff-93f3-5e01996cd85e',
      type: 'glossary',
      name: 'Banking',
      fullyQualifiedName: 'Banking',
      description: 'Test',
      deleted: false,
      href: 'http://localhost:8585/api/v1/glossaries/36b9b2b0-e031-4aff-93f3-5e01996cd85e',
    },
    parent: {
      id: '4242d926-8b80-4b03-9dbe-ab7138c45494',
      type: 'glossaryTerm',
      name: 'Term1',
      fullyQualifiedName: 'Banking.Term1',
      description: 'test',
      displayName: '',
      deleted: false,
      href: 'http://localhost:8585/api/v1/glossaryTerms/4242d926-8b80-4b03-9dbe-ab7138c45494',
    },
    children: [
      {
        id: '0471d1f3-d0c8-49b6-a7ee-6ef3a716a6a3',
        type: 'glossaryTerm',
        name: 'A_start',
        fullyQualifiedName: 'Banking.Term1.Term2f.A_start',
        description: 'fsggs',
        displayName: '',
        deleted: false,
        href: 'http://localhost:8585/api/v1/glossaryTerms/0471d1f3-d0c8-49b6-a7ee-6ef3a716a6a3',
      },
      {
        id: 'd88adce6-4cc3-4088-b436-4630c87307f0',
        type: 'glossaryTerm',
        name: 'BG1',
        fullyQualifiedName: 'Banking.Term1.Term2f.BG1',
        description: 'fsff',
        displayName: '',
        deleted: false,
        href: 'http://localhost:8585/api/v1/glossaryTerms/d88adce6-4cc3-4088-b436-4630c87307f0',
      },
    ],
    relatedTerms: [],
    references: [],
    version: 0.1,
    updatedAt: 1689247376963,
    updatedBy: 'admin',
    href: 'http://localhost:8585/api/v1/glossaryTerms/50f1f9ab-50f2-45c5-a1b8-06aa03ece34a',
    reviewers: [],
    owner: {
      id: '6c5e77d7-8e4f-4f0e-a746-477702901997',
      type: 'user',
      name: 'admin',
      fullyQualifiedName: 'admin',
      deleted: false,
      href: 'http://localhost:8585/api/v1/users/6c5e77d7-8e4f-4f0e-a746-477702901997',
    },
    tags: [],
    entityStatus: 'Draft' as EntityStatus,
    deleted: false,
    provider: ProviderType.User,
    mutuallyExclusive: false,
  },
];

export const MOCKED_GLOSSARY_TERMS_TREE_1 = [
  {
    id: '4242d926-8b80-4b03-9dbe-ab7138c45494',
    name: 'Term1',
    displayName: '',
    description: 'test',
    fullyQualifiedName: 'Banking.Term1',
    synonyms: [],
    glossary: {
      id: '36b9b2b0-e031-4aff-93f3-5e01996cd85e',
      type: 'glossary',
      name: 'Banking',
      fullyQualifiedName: 'Banking',
      description: 'Test',
      deleted: false,
      href: 'http://localhost:8585/api/v1/glossaries/36b9b2b0-e031-4aff-93f3-5e01996cd85e',
    },
    children: [
      {
        id: '50f1f9ab-50f2-45c5-a1b8-06aa03ece34a',
        name: 'Term2f',
        displayName: '',
        description: 'afa',
        fullyQualifiedName: 'Banking.Term1.Term2f',
        synonyms: [],
        glossary: {
          id: '36b9b2b0-e031-4aff-93f3-5e01996cd85e',
          type: 'glossary',
          name: 'Banking',
          fullyQualifiedName: 'Banking',
          description: 'Test',
          deleted: false,
          href: 'http://localhost:8585/api/v1/glossaries/36b9b2b0-e031-4aff-93f3-5e01996cd85e',
        },
        parent: {
          id: '4242d926-8b80-4b03-9dbe-ab7138c45494',
          type: 'glossaryTerm',
          name: 'Term1',
          fullyQualifiedName: 'Banking.Term1',
          description: 'test',
          displayName: '',
          deleted: false,
          href: 'http://localhost:8585/api/v1/glossaryTerms/4242d926-8b80-4b03-9dbe-ab7138c45494',
        },
        children: [
          {
            id: '0471d1f3-d0c8-49b6-a7ee-6ef3a716a6a3',
            name: 'A_start',
            displayName: '',
            description: 'fsggs',
            fullyQualifiedName: 'Banking.Term1.Term2f.A_start',
            synonyms: [],
            glossary: {
              id: '36b9b2b0-e031-4aff-93f3-5e01996cd85e',
              type: 'glossary',
              name: 'Banking',
              fullyQualifiedName: 'Banking',
              description: 'Test',
              deleted: false,
              href: 'http://localhost:8585/api/v1/glossaries/36b9b2b0-e031-4aff-93f3-5e01996cd85e',
            },
            parent: {
              id: '50f1f9ab-50f2-45c5-a1b8-06aa03ece34a',
              type: 'glossaryTerm',
              name: 'Term2f',
              fullyQualifiedName: 'Banking.Term1.Term2f',
              description: 'afa',
              displayName: '',
              deleted: false,
              href: 'http://localhost:8585/api/v1/glossaryTerms/50f1f9ab-50f2-45c5-a1b8-06aa03ece34a',
            },
            relatedTerms: [],
            references: [],
            version: 0.1,
            updatedAt: 1689250037364,
            updatedBy: 'admin',
            href: 'http://localhost:8585/api/v1/glossaryTerms/0471d1f3-d0c8-49b6-a7ee-6ef3a716a6a3',
            reviewers: [],
            owner: {
              id: '6c5e77d7-8e4f-4f0e-a746-477702901997',
              type: 'user',
              name: 'admin',
              fullyQualifiedName: 'admin',
              deleted: false,
              href: 'http://localhost:8585/api/v1/users/6c5e77d7-8e4f-4f0e-a746-477702901997',
            },
            tags: [],
            entityStatus: 'Draft' as EntityStatus,
            deleted: false,
            provider: ProviderType.User,
            mutuallyExclusive: false,
            type: 'glossaryTerm',
          },
          {
            id: 'd88adce6-4cc3-4088-b436-4630c87307f0',
            name: 'BG1',
            displayName: '',
            description: 'fsff',
            fullyQualifiedName: 'Banking.Term1.Term2f.BG1',
            synonyms: [],
            glossary: {
              id: '36b9b2b0-e031-4aff-93f3-5e01996cd85e',
              type: 'glossary',
              name: 'Banking',
              fullyQualifiedName: 'Banking',
              description: 'Test',
              deleted: false,
              href: 'http://localhost:8585/api/v1/glossaries/36b9b2b0-e031-4aff-93f3-5e01996cd85e',
            },
            parent: {
              id: '50f1f9ab-50f2-45c5-a1b8-06aa03ece34a',
              type: 'glossaryTerm',
              name: 'Term2f',
              fullyQualifiedName: 'Banking.Term1.Term2f',
              description: 'afa',
              displayName: '',
              deleted: false,
              href: 'http://localhost:8585/api/v1/glossaryTerms/50f1f9ab-50f2-45c5-a1b8-06aa03ece34a',
            },
            children: [
              {
                id: 'e01f0674-4963-43d9-a9eb-0967c63e1385',
                name: 'A_bg1',
                displayName: '',
                description: 'fsff',
                fullyQualifiedName: 'Banking.Term1.Term2f.BG1.A_bg1',
                synonyms: [],
                glossary: {
                  id: '36b9b2b0-e031-4aff-93f3-5e01996cd85e',
                  type: 'glossary',
                  name: 'Banking',
                  fullyQualifiedName: 'Banking',
                  description: 'Test',
                  deleted: false,
                  href: 'http://localhost:8585/api/v1/glossaries/36b9b2b0-e031-4aff-93f3-5e01996cd85e',
                },
                parent: {
                  id: 'd88adce6-4cc3-4088-b436-4630c87307f0',
                  type: 'glossaryTerm',
                  name: 'BG1',
                  fullyQualifiedName: 'Banking.Term1.Term2f.BG1',
                  description: 'fsff',
                  displayName: '',
                  deleted: false,
                  href: 'http://localhost:8585/api/v1/glossaryTerms/d88adce6-4cc3-4088-b436-4630c87307f0',
                },
                relatedTerms: [],
                references: [],
                version: 0.1,
                updatedAt: 1689250053292,
                updatedBy: 'admin',
                href: 'http://localhost:8585/api/v1/glossaryTerms/e01f0674-4963-43d9-a9eb-0967c63e1385',
                reviewers: [],
                owner: {
                  id: '6c5e77d7-8e4f-4f0e-a746-477702901997',
                  type: 'user',
                  name: 'admin',
                  fullyQualifiedName: 'admin',
                  deleted: false,
                  href: 'http://localhost:8585/api/v1/users/6c5e77d7-8e4f-4f0e-a746-477702901997',
                },
                tags: [],
                entityStatus: 'Draft' as EntityStatus,
                deleted: false,
                provider: ProviderType.User,
                mutuallyExclusive: false,
                type: 'glossaryTerm',
              },
            ],
            relatedTerms: [],
            references: [],
            version: 0.2,
            updatedAt: 1689247414058,
            updatedBy: 'admin',
            href: 'http://localhost:8585/api/v1/glossaryTerms/d88adce6-4cc3-4088-b436-4630c87307f0',
            reviewers: [],
            owner: {
              id: '6c5e77d7-8e4f-4f0e-a746-477702901997',
              type: 'user',
              name: 'admin',
              fullyQualifiedName: 'admin',
              deleted: false,
              href: 'http://localhost:8585/api/v1/users/6c5e77d7-8e4f-4f0e-a746-477702901997',
            },
            tags: [],
            changeDescription: {
              fieldsAdded: [],
              fieldsUpdated: [
                {
                  name: 'parent',
                  oldValue:
                    '{"id":"4242d926-8b80-4b03-9dbe-ab7138c45494","type":"glossaryTerm","name":"Term1","fullyQualifiedName":"Banking.Term1","description":"test","displayName":"","deleted":false}',
                  newValue:
                    '{"id":"50f1f9ab-50f2-45c5-a1b8-06aa03ece34a","type":"glossaryTerm","name":"Term2f","fullyQualifiedName":"Banking.Term1.Term2f","description":"afa","displayName":"","deleted":false}',
                },
              ],
              fieldsDeleted: [],
              previousVersion: 0.1,
            },
            entityStatus: 'Draft' as EntityStatus,
            deleted: false,
            provider: ProviderType.User,
            mutuallyExclusive: false,
            type: 'glossaryTerm',
          },
        ],
        relatedTerms: [],
        references: [],
        version: 0.1,
        updatedAt: 1689247376963,
        updatedBy: 'admin',
        href: 'http://localhost:8585/api/v1/glossaryTerms/50f1f9ab-50f2-45c5-a1b8-06aa03ece34a',
        reviewers: [],
        owner: {
          id: '6c5e77d7-8e4f-4f0e-a746-477702901997',
          type: 'user',
          name: 'admin',
          fullyQualifiedName: 'admin',
          deleted: false,
          href: 'http://localhost:8585/api/v1/users/6c5e77d7-8e4f-4f0e-a746-477702901997',
        },
        tags: [],
        entityStatus: 'Draft' as EntityStatus,
        deleted: false,
        provider: ProviderType.User,
        mutuallyExclusive: false,
        type: 'glossaryTerm',
      },
    ],
    relatedTerms: [],
    references: [],
    version: 0.1,
    updatedAt: 1689247367690,
    updatedBy: 'admin',
    href: 'http://localhost:8585/api/v1/glossaryTerms/4242d926-8b80-4b03-9dbe-ab7138c45494',
    reviewers: [],
    owner: {
      id: '6c5e77d7-8e4f-4f0e-a746-477702901997',
      type: 'user',
      name: 'admin',
      fullyQualifiedName: 'admin',
      deleted: false,
      href: 'http://localhost:8585/api/v1/users/6c5e77d7-8e4f-4f0e-a746-477702901997',
    },
    tags: [],
    entityStatus: 'Draft' as EntityStatus,
    deleted: false,
    provider: ProviderType.User,
    mutuallyExclusive: false,
  },
];

export const MOCK_CSV_GLOSSARY_DATA = {
  rowData: [
    [
      'status',
      'details',
      'parent',
      'name*',
      'displayName',
      'description',
      'synonyms',
      'relatedTerms',
      'references',
      'tags',
      'reviewers',
      'owner',
      'status',
    ],
    [
      'success',
      'Entity updated',
      '',
      'WDcXWwSiEO',
      'WDcXWwSiEO',
      'Lorem ipsum dolor sit amet. Ut alias ducimus et dolores delectus et distinctio quas vel nulla dolores! Ut molestiae atque qui expedita',
      'Xqumt;uLRNP;NzBwF;ZyyVE;MrRJD',
      '',
      '',
      '',
      '',
      '',
      '',
    ],
    [
      'success',
      'Entity updated',
      'Business Glossary.WDcXWwSiEO',
      'WAZvgoykFi',
      'WAZvgoykFi',
      'Lorem ipsum dolor sit amet. Ut alias ducimus et dolores delectus et distinctio quas vel nulla dolores! Ut molestiae atque qui expedita',
      'XbXgz;oDbBZ;nbRtO;OnVdL;SRFJh',
      '',
      '',
      '',
      '',
      '',
      '',
    ],
  ],
  parseData: [
    {
      status: '',
      details: 'Entity updated',
      parent: '',
      'name*': 'WDcXWwSiEO',
      displayName: 'WDcXWwSiEO',
      description:
        'Lorem ipsum dolor sit amet. Ut alias ducimus et dolores delectus et distinctio quas vel nulla dolores! Ut molestiae atque qui expedita',
      synonyms: 'Xqumt;uLRNP;NzBwF;ZyyVE;MrRJD',
      relatedTerms: '',
      references: '',
      tags: '',
      reviewers: '',
      owner: '',
    },
    {
      status: '',
      details: 'Entity updated',
      parent: 'Business Glossary.WDcXWwSiEO',
      'name*': 'WAZvgoykFi',
      displayName: 'WAZvgoykFi',
      description:
        'Lorem ipsum dolor sit amet. Ut alias ducimus et dolores delectus et distinctio quas vel nulla dolores! Ut molestiae atque qui expedita',
      synonyms: 'XbXgz;oDbBZ;nbRtO;OnVdL;SRFJh',
      relatedTerms: '',
      references: '',
      tags: '',
      reviewers: '',
      owner: '',
    },
  ],
};
